<div class="wide form">

	<?php
	$form = $this->beginWidget('CActiveForm',
		array(
		'action'=>Yii::app()->createUrl($this->route),
		'method'=>'get',
		));
	?>

	<div class="row">
		<?php
		echo $form->label($model, 'employeeId');
		$criteria = array(
			'order'=>'name',
		);
		$models = Employee::model()->findAll($criteria);
		$data = CHtml::listData($models, 'id', 'name');
		$htmlOptions = array('empty'=>'');
		echo $form->dropDownList($model, 'employeeId', $data, $htmlOptions);
		echo $form->error($model, 'employeeId');
		?>
	</div>

	<div class="row">
		<?php
		echo $form->label($model, 'name');
		$data = array(
			Leave::NAME_ANNUALY=>Leave::NAME_ANNUALY,
			Leave::NAME_CONDOLENCE=>Leave::NAME_CONDOLENCE,
			Leave::NAME_MARRIAGE=>Leave::NAME_MARRIAGE,
			Leave::NAME_MATERNITY=>Leave::NAME_MATERNITY,
			Leave::NAME_SICK=>Leave::NAME_SICK,
		);
		$htmlOptions = array('empty'=>'');
		echo $form->dropDownList(
			$model, 'name', $data, $htmlOptions
		);
		?>
	</div>

	<div class="row">
		<?php
		echo $form->label($model, 'start');
		$options = array(
			'model'=>$model,
			'attribute'=>'start',
			'options'=>array(
				'dateFormat'=>'yy-mm-dd',
				'changeMonth'=>true,
				'changeYear'=>true,
			),
			'htmlOptions'=>array(
				'style'=>'height:20px;'
			),
		);
		$this->widget('zii.widgets.jui.CJuiDatePicker', $options);
		?>
	</div>

	<div class="row">
		<?php
		echo $form->label($model, 'debit');
		echo $form->textField($model, 'debit');
		?>
	</div>

	<div class="row">
		<?php
		echo $form->label($model, 'balance');
		echo $form->textField($model, 'balance');
		?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Search'); ?>
	</div>

	<?php $this->endWidget(); ?>

</div><!-- search-form -->